;
(function() {
	var skill = {

		save: function() {
			db.update(config.dbname.dotnarCase, this._id, this);
		},
		destroy: function() {
			db.remove(config.dbname.dotnarCase, this._id);
		},
		//非安全
		_setInfo: function(info) {
			/*
			 * TODO:填平参数
			 */
			this._initInfo(info);
			this.save();
			return this._id;
		},
		_initInfo: function(info) {
			info.title = info.title?info.title.trim():"";
			info.href = info.href?info.href.trim():"";
			info.src = info.src?info.src.trim():"";
			if(!info.title){
				throwCusError("案例标题不可为空")
			}
			this.info.title = info.title;
			if(!info.href){
				throwCusError("案例链接不可为空")
			}
			this.info.href = info.href;
			if(!info.src){
				throwCusError("案例封面不可为空")
			}
			this.info.src = info.src;
		},
	}
	module.exports = skill;

	var db = require("../db/index");
	var config = require("../_include/config");
	var UserAddressCon = require("../user_address/_con");
	var AchCon = require("../ach/_con");
	var data_cut = require("../_include/data_cut");
	var CommentCon = require("../comment/_con");
	var EvaluationCon = require("../eval/_con");
	var ClassifyCon = require("../bus.classify/_con");
	var TagCon = require("../bus.tag/_con");
	var BuffCon = require("../buff/_con");
	var buffCode = require("../buff/buff_code");
	var $Object = require("../_include/$.Object");
	var helper = require("../_include/helper");


}());